#pragma once
#include "TermVariable.h"


// AbstractionTerm command target

class AbstractTerm : public Term
{

protected:
	TokenPair VarBody;

public:
	Term::const_reference getBody() const {return _TERM(VarBody.getRight());};
	Term::const_reference getVar() const {return _TERM(VarBody.getLeft());};
	bool isAbstractTerm() const{return true;};
	static Term::pointer curry(Term::const_reference Ter);
	Term::pointer normalized() const;

public:
		Token::pointer applyArgument(Token::const_reference)  const;
		Token::pointer clone() const;
		bool isReducible() const;	   
		string toString() const;
		string view() const;
		bool operator==(Token::const_reference To) const;
		Token::pointer replaceAll(Token::const_reference, Token::const_reference) const;
		size_t complexity() const;

public:
	bool TypeOccursinFreeVariable(Type::const_reference) const;

public:
//Construction-Destruction
	AbstractTerm(Term::const_reference,Term::const_reference, const string& = "");
	AbstractTerm(const AbstractTerm &);
	virtual ~AbstractTerm();
};


